import { Button, Result } from "antd"
import { ReactElement } from 'react';

const NotFound = () => {
  const navigate = useNavigate()
  function goHome() {
    navigate('/')
  }
  return <Result
    status="404"
    title="404"
    subTitle="Sorry, the page you visited does not exist."
    extra={<Button onClick={goHome} type="primary">Back Home</Button>}
  />
}

NotFound.getLayout = ({children}: {children: ReactElement}) => (
  <>{children}</>
)

export default NotFound
